﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

using Weazel.Badger.Vhdl.Types;

namespace Weazel.Badger.Vhdl.Operators.Unary
{
  public class IntegerConversion : UnaryFunction
  {
    private static UnaryTypeMap[] typeMaps = new UnaryTypeMap[]
      {
        new UnaryTypeMap(Types.Types.Integer, Types.Types.Integer),
        new UnaryTypeMap(Types.Types.Signed, Types.Types.Integer),
        new UnaryTypeMap(Types.Types.Unsigned, Types.Types.Integer)
      };

    public override UnaryTypeMap[] TypeMap
    {
      get
      {
        return typeMaps;
      }
    }

    public IntegerConversion()
    {     
    }

    public override string ToString(string expression)
    {
      return string.Format("conv_integer({0})", expression);
    }
  }
}
